package com.ruitu.mall_98_1.mvp.model;

import com.ruitu.mall_98_1.dao.api.APIRetrofit;
import com.ruitu.mall_98_1.mvp.contract.ProListByModelContract;
import com.ruitu.router_module.bean.api.BaseResult;
import com.ruitu.router_module.bean.api.PageModel;
import com.ruitu.router_module.bean.product.ProList;

import rx.Observable;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;

/**
 * Created by Administrator on 2018/11/05
 */

public class ProListByModelModelImpl implements ProListByModelContract.Model {

    @Override
    public Observable<BaseResult<PageModel<ProList>>> reqProList(String type, String cityName, String keys, int page, int size) {
        return APIRetrofit.getDefault().reqModelProList(type, cityName, keys, page, size)
                .subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread());
    }
}